package com.higgins.eventtracking.client.health;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;

import com.google.gwt.core.client.GWT;
import com.google.gwt.core.client.JavaScriptObject;
import com.google.gwt.user.client.Element;
import com.google.gwt.user.client.rpc.AsyncCallback;
import com.google.gwt.user.client.ui.RootPanel;
import com.google.gwt.user.client.ui.VerticalPanel;
import com.google.gwt.visualization.client.DataTable;
import com.google.gwt.visualization.client.VisualizationUtils;
import com.google.gwt.visualization.client.AbstractDataTable.ColumnType;
import com.google.gwt.visualization.client.visualizations.LineChart;
import com.higgins.eventtracking.client.EventTrackingService;
import com.higgins.eventtracking.client.EventTrackingServiceAsync;
import com.higgins.eventtracking.client.dto.HealthEventDTO;
import com.higgins.eventtracking.client.dto.HealthStatsDTO;
import com.higgins.eventtracking.server.DateUtility;

public class AnnotatedChart extends VerticalPanel	{
	protected final EventTrackingServiceAsync greetingService = GWT
										.create(EventTrackingService.class);
	protected AnnotatedChart annotatedChart = this;
	protected String title = null;
	protected String columnA = null;
	protected String columnB = null;
	protected String columnC = null;
	protected Integer scale = 10;
//	protected Boolean firstTime = true;
	
	public AnnotatedChart()	{
		this.setWidth("800px");
		this.setHeight("350px");
		
	}
	public void setTitle(String title)	{
		this.title = title;
	}
	public void setColumnA(String columnA)	{
		this.columnA = columnA;
	}
	public void setColumnB(String columnB)	{
		this.columnB = columnB;
	}
	public void setColumnC(String columnC)	{
		this.columnC = columnC;
	}
	public void setScale(Integer scale)	{
		this.scale = scale;
	}
	
	public static native JavaScriptObject createDygraph(Element element,
            DataTable dataTable, double minY, double maxY) /*-{
        var chart = new $wnd.Dygraph.GVizChart(element);
        chart.draw(dataTable, {
            valueRange : [ minY, maxY ],
            displayAnnotations : true,
            showRangeSelector : true,
            legend : 'always',
            labelsDivStyles : {
                'textAlign' : 'right'
            },
            title : 'TITLE',
            titleHeight : 25,            
            axes : {
                x : {
                    pixelsPerLabel : 50
                }
            }            
        });
        return chart;
    }-*/;	
	public void execute(String chartName)	{

	}
}
